package com.nwpu.main;

import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 * MethodSet
 *
 * @author 龙虹宇
 * @version 1.0
 * @date 2023/11/24
 */
public interface MethodSet extends Remote {
    /**
     * Register string.
     *
     * @param username the username
     * @param password the password
     * @return the string
     * @throws RemoteException the remote exception
     */
    String register(String username, String password) throws RemoteException;

    /**
     * Show users string.
     *
     * @return the string
     * @throws RemoteException the remote exception
     */
    String showUsers() throws RemoteException;

    /**
     * Check messages string.
     *
     * @param username the username
     * @param password the password
     * @return the string
     * @throws RemoteException the remote exception
     */
    String checkMessages(String username, String password) throws RemoteException;

    /**
     * Leave message string.
     *
     * @param username     the username
     * @param password     the password
     * @param receiverName the receiver name
     * @param messageText  the message text
     * @return the string
     * @throws RemoteException the remote exception
     */
    String leaveMessage(String username, String password, String receiverName, String messageText) throws RemoteException;

    /**
     * Help string.
     *
     * @return the string
     * @throws RemoteException the remote exception
     */
    String help() throws RemoteException;
}
